# Contributor: Joe Searle <joe@jsearle.net>
# Maintainer: Joe Searle <joe@jsearle.net>
pkgname=tcolors
pkgver=0.3.1
pkgrel=0
pkgdesc="Commandline color picker and palette builder"
url="https://github.com/bcicen/tcolors"
arch=""
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/bcicen/tcolors/archive/v$pkgver.tar.gz"
options="!check" # No tests

build() {
	go mod download
	go build -ldflags "-w -X main.version=${pkgver}-${pkgrel} -X main.build=$pkgbuild" -o tcolors
}

package() {
	install -Dm755 tcolors "${pkgdir}/usr/bin/tcolors"
	install -Dm644 docs/man1/tcolors.1 "$pkgdir/usr/share/man/man1/${pkgname}.1"
}

sha512sums="ec492f93ca819140b8b933d57c6e352eecd67e3c9c8f404d87f63a191bed92290ab13730cf311697952a581a83671562937150bd450a5a58aedb2add3b83a670  tcolors-0.3.1.tar.gz"
